import axios from "axios";

axios.interceptors.request.use( (config:any) =>{

    console.log( config );

    const token = localStorage.getItem('token');
    if( config.url.indexOf('?') > -1 ){
        config.url += '&token=' + token;
    }else{
        config.url += '?token=' + token;
    }

    return config;
})

export default axios;